﻿<%@ Page Language="C#" MasterPageFile="~/Template/Detail.master" AutoEventWireup="true"
    CodeFile="AuditClassMemberDetail.aspx.cs" Inherits="Page_AuditClassMemberDetail"
    Title="Untitled Page" %>

<%@ Register Src="~/Control/TabberHeader.ascx" TagName="TabberHeader" TagPrefix="wsc" %>
<%@ Register Src="~/Control/ListHeader.ascx" TagName="ListHeader" TagPrefix="wsc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link type="text/css" href="../css/smoothness/jquery-ui-1.7.2.custom.css" rel="stylesheet" />

    <script type="text/javascript" src="../Js/jquery-1.3.2.min-vsdoc.js"></script>

    <script type="text/javascript" src="../Js/jquery-1.3.2.min.js"></script>

    <script type="text/javascript" src="../Js/jquery-ui-1.7.2.custom.min.js"></script>

    <script type="text/javascript" src="../My97DatePicker/WdatePicker.js"></script>

    <script type="text/javascript">

        function ChangeDetailView1() {
            var height = document.body.clientHeight;
            var infoDetail = document.getElementById("trInfo1");
            if (infoDetail.style.display == 'none') {
                document.getElementById("imgExpand1").src = "../Images/Icon/icon-collapse.png";
                infoDetail.style.display = '';
            }
            else {
                document.getElementById("imgExpand1").src = "../Images/Icon/icon-expand.png";
                infoDetail.style.display = 'none';
            }
            PageResize();
        }
        $(function() {
            $("#dialog").dialog({ autoOpen: false });

        });
        function auditFail() {
            if ($("#AuditList :checkbox:checked").length > 0) {
                $("#dialog").dialog({
                    height: 400, width: 400
                }).dialog("open")
            .parent().appendTo("#dialog_target");
            } else {
                alert("请选择学员！");
            }
        }

        function editInfo() {
            var width = 530;
            var height = 580;
            window.open("NewTrainClass.aspx?ClassID=<%=ClassID %>&Nocache=" + Math.random(), "newwindow", 'width=' + width + ',height=' + height + ',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,left=' + (screen.width - width) / 2 + ',top=' + (screen.height - height) / 2);
        }
        function viewUser(userID) {
            var width = 330;
            var height = 400;
            window.open("UserInfoDetail.aspx?UserID=" + userID + "&Nocache=" + Math.random(), "newwindow", 'width=' + width + ',height=' + height + ',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,left=' + (screen.width - width) / 2 + ',top=' + (screen.height - height) / 2);
        }
        function selectAll(cbSelecteAll) {
            for (var i = 0; i < document.aspnetForm.elements.length; i++) {
                var e = document.aspnetForm.elements[i];
                if (e.type == "checkbox") {
                    e.checked = cbSelecteAll.checked;
                }
            }
        }
        function auditPass() {
            if ($("#AuditList :checkbox:checked").length > 0) {
                if (window.confirm("确认通过？")) {
                    document.getElementById("<%=btnAuditPass.ClientID %>").click();
                }
            } else {
                alert("请选择学员！");
            }
        }
        function addMember() {
            var width = 530;
            var height = 600;
            window.open("SelectClassMember.aspx?ApplyOrganID=<%=ApplyOrganID %>&ClassID=<%=ClassID %>&Nocache=" + Math.random(), "newwindow", 'width=' + width + ',height=' + height + ',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,left=' + (screen.width - width) / 2 + ',top=' + (screen.height - height) / 2);
        }
        function deleteMember() {
            document.getElementById("<%=btnDelete.ClientID %>").click();
        }
        function refreshDetail() {
            window.parent.refresh();
        }
    </script>

    <style type="text/css">
        .FieldName
        {
            width: 70px;
        }
        .FieldInput
        {
            width: 130px;
        }
        .TextArea01
        {
            height: 60px;
            width: 80%;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ListToolBarPlaceHolder" runat="Server">
    <table cellspacing="2" cellpadding="0" border="0" id="tblOperator" runat="server">
        <tr runat="server" id="trToolMenu">
            <td class="ToolMenu" width="60">
                <div class="Normal" oldclass="Normal" onmouseover="OverChangeClass(this);" onmouseout="ReturnClass(this)"
                    onclick="auditPass();">
                    <span>
                        <img src="../Images/Icon/Object/tz-add.gif" alt="" /></span><span>审核通过</span>
                </div>
            </td>
            <td class="Fg">
                <img src="../Images/FgLine.gif" alt="" />
            </td>
            <td class="ToolMenu" width="60">
                <div class="Normal" oldclass="Normal" onmouseover="OverChangeClass(this);" onmouseout="ReturnClass(this)"
                    onclick="auditFail();">
                    <span>
                        <img src="../Images/Icon/Action/delete.gif" alt="" /></span><span>审核不通过</span>
                </div>
            </td>
            <td class="Fg">
                <img src="../Images/FgLine.gif" alt="" />
            </td>
            
            <td class="ToolMenu" width="60">
                <div class="Normal" oldclass="Normal" onmouseover="OverChangeClass(this);" onmouseout="ReturnClass(this)">
                    <asp:DropDownList runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlMemberStatus_SelectedIndexChanged"
                        ID="ddlMemberStatus">
                        <asp:ListItem Selected="True" Text="待审核" Value="待审核"></asp:ListItem>
                        <asp:ListItem Text="审核通过" Value="审核通过"></asp:ListItem>
                        <asp:ListItem Text="审核驳回" Value="审核驳回"></asp:ListItem>
                    </asp:DropDownList>
                </div>
            </td>
            <td class="Fg">
                <img src="../Images/FgLine.gif" alt="" />
            </td>
            <td class="ToolMenu" runat="server" id="tdAdd">
                <div class="Normal" oldclass="Normal" onmouseover="OverChangeClass(this);" onmouseout="ReturnClass(this)"
                    onclick="addMember();">
                    <span>
                        <img src="../Images/Icon/Object/tz-add.gif" alt="" /></span><span>增加</span>
                </div>
            </td>
            <td class="Fg" runat="server" id="tdAddFg">
                <img src="../Images/FgLine.gif" alt="" />
            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="TitleContentPlaceHolder" runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="InfoContentPlaceHolder" runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="TextContentPlaceHolder" runat="Server">
</asp:Content>
<asp:Content ID="Content9" ContentPlaceHolderID="TabberContentPlaceHolder" runat="Server">
    <wsc:TabberHeader ID="thInfo" runat="server" DivID="div1" Title="人员列表" Selected="true" />
    <wsc:TabberHeader ID="thOrderInfo" runat="server" DivID="div2" Title="班级详细" />
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="Div1ContentPlaceHolder" runat="Server">
    <div style="display: none;">
        <div id="dialog" title="驳回原因" class="ui-dialog">
            <table id="Table1" border="0" cellspacing="0" cellpadding="0" class="FormTable tablefix">
                <tr>
                    <td>
                        <div style="text-align: center;">
                            <asp:TextBox TextMode="MultiLine" CssClass="TextArea01" runat="server" ID="tbAuditFailReason"></asp:TextBox>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div style="text-align: center; margin-top: 5px;">
                            <asp:Button runat="server" ID="btnAuditFail" OnClick="btnAuditFail_Click" CssClass="Button01"
                                Text="确定" />
                        </div>
                    </td>
                </tr>
            </table>
        </div>
        <asp:Button ID="btnAuditPass" runat="server" OnClick="btnAuditPass_Click" />
        <asp:TextBox ID="tbUserID" runat="server"></asp:TextBox>
        <asp:TextBox ID="tbUserName" runat="server"></asp:TextBox>
        <asp:TextBox ID="tbUserDisplayName" runat="server"></asp:TextBox>
        <asp:Button ID="btnDelete" runat="server" OnClick="btnDelete_Click" />
    </div>
    <div id="dialog_target">
    </div>
    <table cellspacing="0" cellpadding="0" border="0" class="" width="100%"">
        <tr>
            <td class="DetailHeader">
                <table cellspacing="0" cellpadding="0" border="0" width="100%">
                    <tr>
                        <td class="ArticleTitle">
                            <asp:Literal ID="ltTitle" runat="server"></asp:Literal>
                        </td>
                        <td width="0" style="display: none;">
                            <a href="#">
                                <img src="../Images/Icon/icon-collapse.png" alt="字段" style="cursor: pointer;" onclick="ChangeDetailView1();"
                                    id="imgExpand1" /></a>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr id="trInfo1">
            <td>
                <table cellspacing="0" cellpadding="0" border="0" class="PageGridHeader" width="100%">
                    <wsc:ListHeader Type="CheckBox" ID="lhcbUser" Align="center" runat="server" Width="30" />
                    <wsc:ListHeader ID="lhMemberName" runat="server" Title="&nbsp;姓名" Width="100" />
                    <wsc:ListHeader ID="lhDepartment" runat="server" Title="&nbsp;单位" Width="100" />
                    <wsc:ListHeader ID="ListHeader2" runat="server" Title="&nbsp;审核状态" Width="100" />
                    <wsc:ListHeader ID="lhUser" runat="server" Title="&nbsp;学员详情" Width="100" />
                </table>
                <table width="100%" border="0" cellspacing="0" cellpadding="0" class="MainInfolist"
                    id="AuditList">
                    <asp:Repeater ID="rptMemberInfo" runat="server" OnItemDataBound="rptUserInfo_ItemDataBound">
                        <ItemTemplate>
                            <tr id="TableRow_<%# Container.ItemIndex%>" style="cursor: hand; text-align: left;"
                                class="Normal" oldclass="Normal" onmouseover="OverChangeClass(this);" onmouseout="ReturnClass(this)">
                                <td width="30" id="tdCb" runat="server" align="center">
                                    <asp:CheckBox ID="cbUser" runat="server" />
                                </td>
                                <td style="display: none;">
                                    <%# DataBinder.Eval(Container.DataItem,"ID") %>
                                </td>
                                <td width="100">
                                    <asp:Label runat="server" ID="lFullName" Text='<%# DataBinder.Eval(Container.DataItem, "MemberName")%>'></asp:Label>
                                </td>
                                <td width="100">
                                    <%# DataBinder.Eval(Container.DataItem, "ThirdLevelDeptDisplayName")%>
                                </td>
                                <td width="100">
                                    <%# DataBinder.Eval(Container.DataItem, "Status")%>
                                </td>
                                <td width="100">
                                    <a href="#" onclick="viewUser('<%# DataBinder.Eval(Container.DataItem, "ID")%>')">
                                        <img src="../Images/Icon/Object/cal-mycal.gif" alt="学员" /></a>
                                </td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                </table>
            </td>
        </tr>
        <tr id="trInfo2">
            <td>
            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="Div2ContentPlaceHolder" runat="Server">
    <div id="MainContent2" class="ScrollDiv">
        <table id="tblDetail" width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td class="DetailTitle">
                    <div class="fixWidth2">
                        <a class="blue-01"><strong>班级名称：</strong></a>
                        <asp:Literal ID="tbClassName" runat="server"></asp:Literal>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="DetailTitle">
                    <div class="fixWidth2">
                        <a class="blue-01"><strong>培训层级：</strong></a>
                        <asp:Literal ID="tbTrainLevel" runat="server"></asp:Literal>
                    </div>
                </td>
            </tr>
            <tr id="trAttachment" runat="server">
                <td class="DetailTitle">
                    <div class="fixWidth2" style="margin-left: 1px;">
                        <a class="blue-01"><strong>开始时间： </strong></a>
                        <asp:Literal ID="tbBeginTime" runat="server"></asp:Literal>
                </td>
            </tr>
            <tr id="tr5" runat="server">
                <td class="DetailTitle">
                    <div class="fixWidth2" style="margin-left: 1px;">
                        <a class="blue-01"><strong>结束时间： </strong></a>
                        <asp:Literal ID="tbEndTime" runat="server"></asp:Literal>
                </td>
            </tr>
            <tr id="tr1" runat="server">
                <td class="DetailTitle">
                    <div class="fixWidth2" style="margin-left: 1px;">
                        <a class="blue-01"><strong>课程学分： </strong></a>
                        <asp:Literal ID="tbScore" runat="server"></asp:Literal>
                </td>
            </tr>
        </table>
        <table id="tblTopContent" border="0" cellspacing="0" cellpadding="0" class="FormTable tablefix"
            width="100%">
            <tr style="display: none;">
                <td class="DetailTitle">
                    <div class="fixWidth2">
                        <a class="blue-01"><strong>讲师介绍： </strong></a>
                        <asp:Literal ID="tbLectorInfo" runat="server"></asp:Literal>
                </td>
            </tr>
            <tr style="display: none;">
                <td class="DetailTitle">
                    <div class="fixWidth2">
                        <a class="blue-01"><strong>课程介绍： </strong></a>
                        <asp:Literal ID="tbCourseInfo" runat="server"></asp:Literal>
                </td>
            </tr>
            <tr>
                <td class="DetailTitle">
                    <div class="fixWidth2">
                        <a class="blue-01"><strong>开课地点： </strong></a>
                        <asp:Literal ID="tbPlace" runat="server"></asp:Literal>
                </td>
            </tr>
            <tr>
                <td class="DetailTitle">
                    <div class="fixWidth2">
                        <a class="blue-01"><strong>备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注： </strong>
                        </a>
                        <asp:Literal ID="tbComment" runat="server"></asp:Literal>
                </td>
            </tr>
            <tr>
                <td class="DetailTitle">
                    <div class="fixWidth2">
                        <a class="blue-01"><strong>教学计划： </strong></a>
                </td>
            </tr>
        </table>
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="box01">
            <tr>
                <td valign="top" class="content" id="MainContentTD">
                    <div id="MainContent" style="overflow: auto; height: 230px; padding-left: 8px;" class="ScrollDiv">
                        <asp:Label ID="tbCurriculum" runat="server"></asp:Label>
                    </div>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="TabberJSContentPlaceHolder" runat="Server">
    var height = document.body.clientHeight; var tblTopContent = document.getElementById("tblTopContent");
    var tblDetail = document.getElementById("tblDetail"); var MainContent2 = document.getElementById("MainContent");
    MainContent2.style.height=(height- 80 - tblTopContent.offsetHeight - tblDetail.offsetHeight)+"px";
    var width = document.body.clientWidth; if(width > 20) document.getElementById("MainContent").style.width
    = (width-5) + "px";
</asp:Content>
